package com.gxa.jd.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * goods实体类
 *
 * @author Administrator
 */
@Table(name = "goods")
@Data
@ApiModel("搜索条件")
public class Goods implements Serializable {

    @Id
    @ApiModelProperty(value = "商品id", dataType = "long")
    private Long id;//商品id

    @ApiModelProperty(value = "商品名", dataType = "string")
    private String name;//商品名称

    @ApiModelProperty(value = "货号", dataType = "string")
    private String num;//货号

    @ApiModelProperty(value = "商品售价", dataType = "double")
    private Double price;//商品售价

    @ApiModelProperty(value = "描述", dataType = "string")
    private String description;//描述

    @ApiModelProperty(value = "上架状态", dataType = "int")
    private Integer status;//上架状态 0下架 1上架

    @JsonIgnore
    @ApiModelProperty(value = "商品库存", dataType = "long")
    private Long stock;//商品库存

    @ApiModelProperty(value = "封面图片", dataType = "string")
    private String image;//封面图片

    @ApiModelProperty(value = "二级分类id", dataType = "long")
    @Column(name = "category_id")
    private Long categoryId;

}
